#define
Defines a macro (constant or function-like).
- Macro is textual substitution performed by the preprocessor.
#define PI 3.14159
#define SQUARE(x) ((x) * (x))
Disadvantages of macros:
- not type-safe
- can lead to subtle bugs
- prefer const, constexpr, and inline functions